One of the most important aspects of a modern computing system is the interface between the human user and the machine. The earliest and most popular type of interface was text based; a user communicated with the machine by typing text characters on a keyboard and the machine communicated with the user by displaying text characters on a display screen. More recently, graphic user interfaces have become popular where the machine communicates with a user by displaying graphics, including text and pictures, on a display screen and the user communicates with the machine both by typing in textual commands and by manipulating the displayed pictures with a pointing device, such as a mouse.
Many modern computer systems operate with a graphic user interface called a window environment. In a typical window environment, the graphical display portrayed on the display screen is arranged to resemble the surface of an electronic "desktop" and each application program running on the computer is represented as one or more electronic "paper sheets" displayed in rectangular regions of the screen called "windows".
Each window region generally displays information which is generated by the associated application program and there may be several window regions simultaneously present on the desktop, each representing information generated by a different application program. An application program presents information to the user through each window by drawing or "painting" images, graphics or text within the window region. The user, in turn, communicates with the application by "pointing at" objects in the window region with a cursor which is controlled by a pointing device and manipulating or moving the objects and also by typing information into the keyboard. The window regions may also be moved around on the display screen and changed in size and appearance so that the user can arrange the desktop in a convenient manner.
Each of the window regions also typically includes a number of standard graphical objects such as sizing boxes, buttons and scroll bars. These features represent user interface devices that the user can point at with the cursor to select and manipulate. When the devices are selected or manipulated, the underlying application program is informed, via the window system, that the control has been manipulated by the user.
In general, the window environment described above is part of the computer operating system. The operating system also typically includes a collection of utility programs that enable the computer system to perform basic operations, such as storing and retrieving information on a disc memory and performing file operations including the creation, naming and renaming of files and, in some cases, performing diagnostic operations in order to discover or recover from malfunctions.
The last part of the computing system is the "application program" which interacts with the operating system to provide much higher level functionality, perform a specific task and provide a direct interface with the user. The application program typically makes use of operating system functions by sending out series of task commands to the operating system which then performs a requested task, for example, the application program may request that the operating system store particular information on the computer disc memory or display information on the video display.
FIG. 1 is a schematic illustration of a typical prior art non-windowing computer system utilizing both an application program and an operating system, wherein the entire display is dedicated to one application at any one time. The computer system is schematically represented by box 100, the application is represented by box 102 and the operating system by box 106. The previously-described interaction between the application program 102 and the operating system 106 is illustrated schematically by arrow 104. This dual program system is used on many types of computer systems ranging from main frames to personal computers.
The method for handling drawing to screen displays varies from computer to computer and, in this regard, FIG. 1 represents a prior art personal computer system. In order to provide drawing to screen displays, application program 102 generally stores information to be displayed (the storing operation is shown schematically by arrow 108) into a screen buffer 110. Under control of various hardware and software in the system the contents of the screen buffer 110 are read out of the buffer and provided, as indicated schematically by arrow 114, to a display adapter 112. The display adapter 112 contains hardware and software (sometimes in the form of firmware) which converts the information in screen buffer 110 to a form which can be used to drive the display monitor 118 which is connected to display adapter 112 by cable 116.
The prior art configuration shown in FIG. 1 generally works well in a system where a single application program with a single thread of execution 102 is running at any given time. This simple system works properly because the single application program thread 102 can write information into any area of the entire screen buffer area 110 without causing a display problem. However, if the configuration shown in FIG. 1 is used in a computer system where more than one application program, or more than one thread of execution in that application program 102 can be operational at the same time (for example, a "multitasking" computer system) display problems can arise. More particularly, if each thread in each application program has access to the entire screen buffer 110, in the absence of some direct communication between threads and applications, one thread may overwrite a portion of the screen buffer which is being used by another thread, thereby causing the display generated by one thread to be overwritten by the display generated by the other thread.
Accordingly, mechanisms were developed to coordinate the operation of the applications as well as the threads of execution within the applications to ensure that each application thread was confined to only a portion of the screen buffer thereby separating the other displays. This coordination became complicated in systems where multiple "windows" with multiple threads drawing to those windows were allowed. The problem was divided into two pieces: Managing the windows and their display area (application programs) and managing the threads of execution within those applications. The Window Manager handles coordination between applications and their windows. The View System handles coordination of threads within the applications and their window(s). Each window is subdivided in a hierarchy of drawing areas called "views" which are associated with specific threads of execution within a given application program.
When the application window is arranged so that views appear to "overlap", a view which appears in the window in "front" of another view covers and obscures part of the underlying view. Thus, except for the foremost view, only part of the underlying views may be drawn on the screen and be "visible" at any given time. Further, because the view can be moved or resized by the user, the portion of each view which is visible changes as other views are added, removed, moved or resized. Thus, the portion of the window which is assigned to each thread also changes as views from other threads are added, removed, moved or resized.
In order to efficiently manage the changes to the window necessary to accommodate rapid screen changes caused by moving or resizing views, the prior art computer arrangement shown in FIG. 1 was modified as shown in FIG. 2. In this new arrangement computer system 200 is controlled by one or more application programs, comprised of one or more threads of execution, of which threads 202 and 216 are shown, and which may be running simultaneously in the computer system. Each of the threads interfaces with the operating system 204 as illustrated schematically by arrows 206 and 220. However, in order to display information on the display screen, application threads 202 and 216 send display information to a central View System 218 located in the operating system 204. The view system 218, in turn, interfaces directly with the screen buffer 210 as illustrated schematically by arrow 208. The contents of screen buffer 210 are provided, as indicated by arrow 212, to a display adapter 214 which is connected by a cable 222 to a display monitor 224.
In such a system, the view system 218 is generally responsible for maintaining all of the display contents that the user sees within a window during operation of the application programs. Since the view system 218 is in communication with all the threads within an application, it can coordinate between threads to insure that view displays do not overlap. Consequently, it is generally the task of the view system to keep track of the location and size of the view and the view areas which must be drawn and redrawn as views and windows are moved.
The view system 218 receives display requests from each of the application threads 202 and 216. However, since only the view system 218 interfaces with the screen buffer 210, it can allocate respective areas of the screen buffer 210 for each application and insure that no thread erroneously overwrites the display generated by another thread. There are a number of different window environments commercially available which utilize the arrangement illustrated in FIG. 2. These include the X/Window Operating environment, the WINDOWS, graphical user interface developed by the Microsoft Corporation and the OS/2 Presentation Manager, developed by the International Business Machines Corporation.
Each of these window environments has its own internal software architecture, but the architectures can all be classified by using a multi-layer model similar to the multi-layer models used to described computer network software. A typical multi-layer model includes the following layers:
User Interface PA1 Window Manager PA1 Resource Control and Communication PA1 Component Driver Software PA1 Computer Hardware
where the term "window environment" refers to all of the above layers taken together.
The lowest or computer hardware level includes the basic computer and associated input and output devices including display monitors, keyboards, pointing devices, such as mice or trackballs, and other standard components, including printers and disc drives. The next or "component driver software" level consists of device-dependent software that generates the commands and signals necessary to operate the various hardware components. The resource control and communication layer interfaces with the component drivers and includes software routines which allocate resources, communicate between applications and multiplex communications generated by the higher layers to the underlying layers. The view system handles the user interface to basic drawing operations, such as moving and resizing views, activating or inactivating views and redrawing and repainting views. The final user interface layer provides high level facilities that implement the various controls (buttons, sliders, boxes and other controls) that application programs use to develop a complete user interface.
Although the arrangement shown in FIG. 2 solves the display screen interference problem, it suffers from the drawback that the view system 218 must process the screen display requests generated by all of the application threads. Since the requests can only be processed serially, the requests are queued for presentation to the view system before each request is processed to generate a display on terminal 224. In a display where many views are present simultaneously on the screen, the view system 218 can easily become a "bottleneck" for display information and prevent rapid changes of the display by the application threads 202 and 216. A delay in the redrawing of the screen when views are moved or repositioned by the user often manifests itself by the appearance that the views and windows are being constructed in a piecemeal fashion which becomes annoying and detracts from the operation of the system.
Accordingly, it is an object of the present invention to provide a view system which can interface with application threads in such a manner that the screen display generated by each application thread can be quickly and effectively redrawn.
It is another object of the present invention to provide a view system which coordinates the display generation for all of the application threads in order to prevent the applications from interfering with each other or overwriting each other on the screen display.
It is yet another object of the present invention to provide a view system which can interact with the application threads by means of a simple command structure without the application threads being concerned with actual implementation details.
It is yet another object of the present invention to provide a view system which allows application developers who need detailed control over the screen display process to achieve this control by means of a full set of display control commands which are available, but need not be used by each application thread.
It is yet another object of the present invention to provide a view system which provides application developers with a powerful and flexible drawing environment which includes a virtual coordinate space, arbitrarily shaped views (and windows) and up-to-date drawing state information to facilitate rapid, accurate drawing from multiple threads of execution.
It is yet another object of the present invention to provide a view system which provides application developers with an automatic system for keeping the display buffer up-to-date.